<table class="table s3">
    <tbody>
    <tr>
        <td class="tth">{{ ts('warrantyid') }}</td>
        <td class="ttd" colspan="5">{{ $model->warranty_id }}</td>
    </tr>
    <tr>
        <td colspan="6" class="tst">{{ ts('CAROWNERINFORMATION') }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('CUSTOMERNAME') }}</td>
        <td class="ttd">{{ $model->first_name }}</td>
        <td class="tth">{{ ts('phonenumber') }}</td>
        <td class="ttd">{{ $model->extension }} {{ $model->phone_number }}</td>
        <td class="tth">{{ ts('email') }}</td>
        <td class="ttd">{{ $model->email_address }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('region') }}</td>
        <td>{{ ts('region_master.'.$model->region_id) }}</td>
        <td class="tth">{{ ts('province') }}</td>
        <td>{{ ts('province_master.'.$model->province_id) }}</td>
        <td class="tth">{{ ts('city') }}</td>
        <td>{{ ts('cities.'.$model->city) }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('addresss') }}</td>
        <td colspan="3">{{ $model->address }}</td>
        <td class="tth">{{ ts('zip') }}</td>
        <td>{{ $model->zip }}</td>
    </tr>
    <tr>
        <td colspan="6" class="tst">{{ ts('VEHICLEINFORMATION') }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('year') }}</td>
        <td>{{ $model->year_id }}</td>
        <td class="tth">{{ ts('make') }}</td>
        <td>{{ ts('make_master.'.$model->make_id) }}</td>
        <td class="tth">{{ ts('model') }}</td>
        <td>
            {{ ts('model_master.'.$model->model_id) ?: $model->model_id }}
        </td>
    </tr>
    <tr>
        <td class="tth">{{ ts('licenseplate') }}</td>
        <td>{{ $model->license_plate }}</td>
        <td class="tth">{{ ts('vinnumber') }}</td>
        <td colspan="3">{{ $model->vin_number }}</td>
    </tr>
    <tr>
        <td colspan="6" class="tst">{{ ts('INSTALLATIONINFORMATION') }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('DMMC') }}</td>
        <td colspan="5">{{ getWDName($model) }}</td>
    </tr>
    <tr>
        <td class="tth">{{ ts('INSTALLERNAME') }}</td>
        <td>{{ $model->installer_name }}</td>
        <td class="tth">{{ ts('INSTALLATIONDATE') }}</td>
        <td>
            {{ fdate(@$model->installation_date) }}
        </td>
    <!--<td class="tth">{{ ts('INSTALLERPRICE') }}</td>
                                            <td>{{ $model->installation_price }}</td>-->
    </tr>
    @empty($model->precut_id)
        <tr>
            <td colspan="6" class="tst">{{ ts('INSTALLATIONPICTURE') }}</td>
        </tr>
        <tr>
            <td colspan="6" class="ttt">
                <x-warranty-image :warranty="$model"></x-warranty-image>
            </td>
        </tr>
    @endif
    <tr>
        <td colspan="6" class="tst">{{ ts('VEHICLECOVERAGE') }}</td>
    </tr>
    @php
        $mRoll = gMR($model->id);
        $wPart = gWFP($model->id);
    @endphp
    @if(@$mRoll)
        <tr>
            <td class="tth">{{ ts('rollnumber') }}</td>
            <td class="ttd" colspan="5">{{ @$mRoll }}</td>
        </tr>
    @endif
    <tr>
        <td colspan="6" class="ttt">
            <table class="table text-center">
                <thead>
                <tr>
                    <th>{{ ts('ZTBW') }}</th>
                    <th>{{ ts('filmtype') }}</th>
                    <th>质保时间</th>
                </tr>
                </thead>
                <tbody>
                @foreach($wPart as $c)
                    <tr>
                        <td>{{ @$c->part }}</td>
                        <td>{{ @$c->film_type }}</td>
                        @if(empty(@$c->start_time))
                            <td></td>
                        @elseif ((@$c->end_time - @$c->start_time) >= 20* 365 * 24 * 60 * 60)
                            <td>终身质保</td>
                        @else
                            <td>{{date("Y-m-d H:i:s",@$c->start_time)}} - {{date("Y-m-d H:i:s",@$c->end_time)}}</td>
                        @endif
                    </tr>
                @endforeach
                </tbody>
            </table>
        </td>
    </tr>
    </tbody>
</table>